package cn.cool.springframework.beans.factory;

import cn.cool.springframework.beans.BeansException;

/**
 * IOC 容器顶层接口
 */
public interface BeanFactory {
    /**
     * 根据 beanName 获取bean
     */
    Object getBean(String name) throws BeansException;

    /**
     * 有参构造的获取bean
     */
    Object getBean(String name, Object... args) throws BeansException;

    /**
     * 返回执行类型的 Bean
     */
    <T> T getBean(String name, Class<T> requiredType) throws BeansException;
}
